<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>ApiTest</title>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.6/vue.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.9.1/axios.js"></script>
</head>
<body>
<div id="app">
	<button @click="ApiFunc()">api测试</button>

</div>

<script>
    new Vue({
        el: "#app",
        data: {
            msg: ""
        },
        methods: {
            ApiFunc() {
                axios({
                    method: "get",     //请求方法
                    url: "http://localhost:8080/student/search_like",
                    headers: {
                        "token": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJVU0VSLTIwMjAtMGJiZjU1MDYiLCJleHAiOjE2MDcwOTIzOTB9.xJCOkBP1Cxrp9gUSLVy7rKwZHxoOgjCV_RAq662zh08",
                        "Content-Type": 'application/json;charset=UTF-8'
                    },
                    data: {
                    
                    }          //请求参数放在请求体中
                    ,
                    params: {              //请求参数拼接在地址栏中
                        "currentPage": 0,
                        "size": 1000,
                        "student": {
                            "institution": {
                                "institutionId": "INSTITUTION-2020-03d43a50",
                            },
                        }
                    }
                }).then(res => {

                    console.log(res);
                }).catch(err => {
                    console.log(err);
                })
            }
        }
    })
</script>
</body>
</html>